package com.mazaiting.aoplog.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.time.LocalDateTime;

/**
 * <p>
 * sys_access_log 访问日志表
 * </p>
 *
 * @author 党海亮
 * @since 2022-04-02
 */
@TableName("sys_access_log")
public class SysAccessLog extends Model<SysAccessLog> {

    /**
     * 主键id
     */
    @TableId("id")
    private Long id;

    /**
     * 请求连接
     */
    @TableField("url")
    private String url;

    /**
     * 参数(JSON格式)
     */
    @TableField("param")
    private String param;

    /**
     * 参数(JSON格式)
     */
    @TableField("result")
    private String result;

    /**
     * 异常类型
     */
    @TableField("exception_type")
    private String exceptionType;

    /**
     *  访问时间
     */
    @TableField("access_time")
    private LocalDateTime accessTime;

    /**
     * 访问IP 
     */
    @TableField("ip")
    private String ip;

    /**
     * 执行时长(ms)
     */
    @TableField("exec_time")
    private Long execTime;

    /**
     * 版本号
     */
    @TableField("version")
    @Version
    private Integer version;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
    public String getParam() {
        return param;
    }

    public void setParam(String param) {
        this.param = param;
    }
    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }
    public LocalDateTime getAccessTime() {
        return accessTime;
    }

    public void setAccessTime(LocalDateTime accessTime) {
        this.accessTime = accessTime;
    }
    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }
    public Long getExecTime() {
        return execTime;
    }

    public void setExecTime(Long execTime) {
        this.execTime = execTime;
    }
    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public String getExceptionType() {
        return exceptionType;
    }

    public void setExceptionType(String exceptionType) {
        this.exceptionType = exceptionType;
    }
}
